import request from '@/utils/request'

// 查询玉米脱粒记录列表
export function listCorn(query) {
  return request({
    url: '/food/corn/list',
    method: 'get',
    params: query
  })
}

// 查询玉米脱粒记录详细
export function getCorn(id) {
  return request({
    url: '/food/corn/' + id,
    method: 'get'
  })
}

// 新增玉米脱粒记录
export function addCorn(data) {
  return request({
    url: '/food/corn',
    method: 'post',
    data: data
  })
}

// 修改玉米脱粒记录
export function updateCorn(data) {
  return request({
    url: '/food/corn',
    method: 'put',
    data: data
  })
}

// 删除玉米脱粒记录
export function delCorn(id) {
  return request({
    url: '/food/corn/' + id,
    method: 'delete'
  })
}
